
<div id="edit-profile-dialog" style="display:none; text-align:left" title="Edit Profile">
<form>
<table>
<tr>
	<td colspan="2" class="section-header">Change Password</td>
</tr>
<tr>
	<th>Old Password:</th><td><input type="password" name="old_password" id="old_password" /></td>
</tr>
<tr>
<th>New Password:</th><td><input type="password" name="new_password" id="new_password" /></td>
</tr>
<tr>
<th>Confirm New Password:</th><td><input type="password" name="cfm_password" id="cfm_password" /></td>
</tr>
<tr>
	<td colspan="2" class="section-header">Set E-Mail</td>
</tr>
<tr>
	<th>E-Mail:</th><td><input type="text" name="email" id="email" value="<?php echo $user->email?>"></td>
</tr>

</table>
</form>
</div>

<script type="text/javascript">

$(function(){
	$("#edit-profile-dialog input").addClass("textinput");
	$("#edit-profile-dialog th").css({
		"border" : "0px solid black",
		"text-align" : "right"
	});
	$("#edit-profile-dialog td").css({
		"border" : "0px solid black",
		"text-align" : "left"
	});
	$("#edit-profile-dialog .section-header").css({
		"font-weight" : "bold",
		"font-size" : "15px",
		"border-bottom" : "1px solid black"
	});
	$("#edit-profile-dialog").dialog({
		autoOpen: true,
		modal: true,
		buttons : {
			"Update" : function() {
				ajaxAdmin("update_profile", {
					cacheable : false, params : {
						"old_password" : $("#old_password").val(),
						"new_password" : $("#new_password").val(),
						"cfm_password" : $("#cfm_password").val(),
						"email" : $("#email").val()
					}
				});
				$("#edit-profile-dialog").dialog("close");
			},
			"Cancel" : function() {
				$("#edit-profile-dialog").dialog("close");
			}
		} 
	});
});

</script>

